import http from '../helper/http.js'
let code = (new Date()).getTime()
const path = '/api/adm/v1/'

// 获取验证码
export let getCode = (data) => {
  return http.post(`${path}captcha`, {
    code,
    w: '105',
    h: '36'
  })
}

// 登录
export let login = (data) => {
  // console.log(data)
  return http.post(`${path}login`, {
    code,
    ...data
  })
}

// 退出登录
export let logout = (data) => {
  return http.post(`${path}logout`)
}

// 省
export let province = (data) => {
  return http.post(`${path}province/index`)
}

// 市
export let city = (id) => {
  return http.post(`${path}city/index`, {
    id
  })
}

// 区/县
export let district = (id) => {
  return http.post(`${path}district/index`, {
    id
  })
}

// 平台管理 - 敏感词列表
export let SensitiveWordsList = (params) => {
  return http.post(`${path}word/index`, params)
}

// 访问日志
export let mblogin = ({ page, num }) => {
  return http.post(`${path}mblogin/index`, {
    page,
    num
  })
}

// 系统银行/api/adm/v1/sysbank/index
export let sysbank = (data) => {
  return http.post(`${path}sysbank/index`)
}
